//AD  <- Needed to identify//
//--automatically built--
//--Project: puutarha.js
var app = new Avidemux();

//** Video **
//** Postproc **
app.video.setPostProc(3, 3, 0);

app.video.fps1000 = 25000;

//** Filters **
app.video.addFilter("YADIF", "mode=3", "order=1");

//** Video Codec conf **
app.video.codecPlugin("32BCB447-21C9-4210-AE9A-4FCE6C8588AE", "x264", "AQ=24", [
    "<?xml version='1.0'?>",
    "<x264Config>",
    "  <x264Options>",
    "    <threads>0</threads>",
    "    <deterministic>true</deterministic>",
    "    <idcLevel>-1</idcLevel>",
    "    <vui>",
    "      <sarAsInput>false</sarAsInput>",
    "      <sarHeight>1</sarHeight>",
    "      <sarWidth>1</sarWidth>",
    "      <overscan>undefined</overscan>",
    "      <videoFormat>undefined</videoFormat>",
    "      <fullRangeSamples>false</fullRangeSamples>",
    "      <colorPrimaries>undefined</colorPrimaries>",
    "      <transfer>undefined</transfer>",
    "      <colorMatrix>undefined</colorMatrix>",
    "      <chromaSampleLocation>0</chromaSampleLocation>",
    "    </vui>",
    "    <referenceFrames>3</referenceFrames>",
    "    <gopMaximumSize>250</gopMaximumSize>",
    "    <gopMinimumSize>25</gopMinimumSize>",
    "    <scenecutThreshold>40</scenecutThreshold>",
    "    <bFrames>16</bFrames>",
    "    <adaptiveBframeDecision>1</adaptiveBframeDecision>",
    "    <bFrameBias>0</bFrameBias>",
    "    <bFrameReferences>1</bFrameReferences>",
    "    <loopFilter>true</loopFilter>",
    "    <loopFilterAlphaC0>0</loopFilterAlphaC0>",
    "    <loopFilterBeta>0</loopFilterBeta>",
    "    <cabac>true</cabac>",
    "    <interlaced>false</interlaced>",
    "    <cqmPreset>flat</cqmPreset>",
    "    <intra4x4Luma>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "    </intra4x4Luma>",
    "    <intraChroma>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "    </intraChroma>",
    "    <inter4x4Luma>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "    </inter4x4Luma>",
    "    <interChroma>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "    </interChroma>",
    "    <intra8x8Luma>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "    </intra8x8Luma>",
    "    <inter8x8Luma>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "      <value>16</value>",
    "    </inter8x8Luma>",
    "    <analyse>",
    "      <partitionI4x4>true</partitionI4x4>",
    "      <partitionI8x8>true</partitionI8x8>",
    "      <partitionP8x8>true</partitionP8x8>",
    "      <partitionP4x4>false</partitionP4x4>",
    "      <partitionB8x8>true</partitionB8x8>",
    "      <dct8x8>true</dct8x8>",
    "      <weightedPrediction>true</weightedPrediction>",
    "      <directPredictionMode>auto</directPredictionMode>",
    "      <chromaLumaQuantiserDifference>0</chromaLumaQuantiserDifference>",
    "      <motionEstimationMethod>multi-hexagonal</motionEstimationMethod>",
    "      <motionVectorSearchRange>16</motionVectorSearchRange>",
    "      <motionVectorLength>-1</motionVectorLength>",
    "      <motionVectorThreadBuffer>-1</motionVectorThreadBuffer>",
    "      <subpixelRefinement>9</subpixelRefinement>",
    "      <chromaMotionEstimation>true</chromaMotionEstimation>",
    "      <mixedReferences>true</mixedReferences>",
    "      <trellis>finalMacroblock</trellis>",
    "      <fastPSkip>true</fastPSkip>",
    "      <dctDecimate>true</dctDecimate>",
    "      <noiseReduction>0</noiseReduction>",
    "      <interLumaDeadzone>21</interLumaDeadzone>",
    "      <intraLumaDeadzone>11</intraLumaDeadzone>",
    "    </analyse>",
    "    <rateControl>",
    "      <quantiserMinimum>10</quantiserMinimum>",
    "      <quantiserMaximum>51</quantiserMaximum>",
    "      <quantiserStep>4</quantiserStep>",
    "      <averageBitrateTolerance>1</averageBitrateTolerance>",
    "      <vbvMaximumBitrate>0</vbvMaximumBitrate>",
    "      <vbvBufferSize>0</vbvBufferSize>",
    "      <vbvInitialOccupancy>0</vbvInitialOccupancy>",
    "      <ipFrameQuantiser>1</ipFrameQuantiser>",
    "      <pbFrameQuantiser>1</pbFrameQuantiser>",
    "      <adaptiveQuantiserMode>variance</adaptiveQuantiserMode>",
    "      <adaptiveQuantiserStrength>1</adaptiveQuantiserStrength>",
    "      <quantiserCurveCompression>0</quantiserCurveCompression>",
    "      <reduceFluxBeforeCurveCompression>20</reduceFluxBeforeCurveCompression>",
    "      <reduceFluxAfterCurveCompression>0</reduceFluxAfterCurveCompression>",
    "    </rateControl>",
    "    <accessUnitDelimiters>false</accessUnitDelimiters>",
    "    <spsIdentifier>0</spsIdentifier>",
    "  </x264Options>",
    "</x264Config>"
        ].join());

//** Audio **
app.audio.reset();
app.audio.codec("copy", 128, 0, "");
app.audio.normalizeMode = 0;
app.audio.normalizeValue = 0;
app.audio.delay = 0;
app.audio.mixer = "NONE";
app.setContainer("MP4");
setSuccess(1);
//app.Exit();
//End of script
